<?php

class PageView{
	
	private $styleSheet = array();
	private $script = array();	
	
	public function AddStyleSheet($href) {
    	$this->styleSheet = "<link rel='StyleSheet' href='$href' type='text/css' />";
  	}
	public function AddScript($src){
		$this->script = "<script type=\"text/javascript\" src=\"$src\"></script>";
	}
	public function GetXHTML($title, $body)
	{
		$xhtml = "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\"> 
        <html xmlns=\"http://www.w3.org/1999/xhtml\"> 
          <head> 
             <title>$title</title> 
             <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />             
             $this->styleSheet          
          </head> 
          <body>
          <div id=\"content\">
            $body
          </div>
          <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js\"></script>
          $this->script
          </body>
        </html>";
    
    	return $xhtml;
	}	
}
